#ifndef __WEB_PAGE_H__
#define __WEB_PAGE_H__

#include <string>
#include <vector>
#include <map>
#include "client/Configuration.h"

using std::string;
using std::vector;
using std::map;


class WebPage{
public:
    WebPage(const string &doc, Configuration &config);
    int getDocId();
    string getDoc();
    map<string, int> &getWordsMap();
    void processDoc(const string &doc, Configuration &config);
    void calcTopK(vector<string> &wordsVec, int k, set<string> &stopWordList);
    friend bool operator==(const WebPage &lhs, const WebPage &rhs);
    friend bool operator<(const WebPage &lhs, const WebPage &rhs);

public :
    int _docId;
    string _doc;
    string _docTitle;
    string _docUrl;
    string _docContent;
};

bool operator==(const WebPage &lhs, const WebPage &rhs);
bool operator<(const WebPage &lhs, const WebPage &rhs);

#endif